打tar包工具TarUtil(10)

本文介绍了一个方法,通过3位八进制字符串来设定Unix文件或目录的用户、组和其他权限,并提供了设置用户名和UID的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

/**
         * A 3 digit octal string, specify the user, group and
         * other modes in the standard Unix fashion;
         * optional, default=0755
         *
         * @param octalString a 3 digit octal string.
         * @since Ant 1.6
         */
        public void setDirMode(String octalString)
        {
            this.dirMode = UnixStat.DIR_FLAG
                    | Integer.parseInt(octalString, MODE);
        }
       
        /**
         * ????¼??
         * @return the current directory mode
         * @since Ant 1.6
         */
        public int getDirMode()
        {
            return dirMode;
        }
       
        /**
         * The username for the tar entry
         * This is not the same as the UID.
         * @param userName the user name for the tar entry.
         */
        public void setUserName(String userName)
        {
            this.userName = userName;
        }
       
        /**
         * ????û???
         * @return the user name for the tar entry
         */
        public String getUserName()
        {
            return userName;
        }
       
        /**
         * The uid for the tar entry
         * This is not the same as the User name.
         * @param uid the id of the user for the tar entry.
         */
        public void setUid(int uid)
        {
            this.uid = uid;
        }

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值