打tar包工具TarUtil(9)

来源:互联网 发布:淘宝导出数据包 编辑:程序博客网 时间:2024/05/22 00:23

/**
         *  Get a list of files and directories specified in the fileset.
         * @param p the current project.
         * @return a list of file and directory names, relative to
         *    the baseDir for the project.
         */
        public String[] getFiles(Project p)
        {
            if (files == null)
            {
                DirectoryScanner ds = getDirectoryScanner(p);
                String[] directories = ds.getIncludedDirectories();
                String[] filesPerSe = ds.getIncludedFiles();
                files = new String[directories.length + filesPerSe.length];
                System.arraycopy(directories, 0, files, 0, directories.length);
                System.arraycopy(filesPerSe,
                        0,
                        files,
                        directories.length,
                        filesPerSe.length);
            }
           
            return files;
        }
       
        /**
         * A 3 digit octal string, specify the user, group and
         * other modes in the standard Unix fashion;
         * optional, default=0644
         * @param octalString a 3 digit octal string.
         */
        public void setMode(String octalString)
        {
            this.fileMode = UnixStat.FILE_FLAG
                    | Integer.parseInt(octalString, MODE);
        }
       
        /**
         * ????????
         * @return the current mode.
         */
        public int getMode()
        {
            return fileMode;
        }