當前位置: 首頁>>代碼示例>>Java>>正文


Java FileSystem類代碼示例

本文整理匯總了Java中org.gradle.internal.nativeintegration.filesystem.FileSystem的典型用法代碼示例。如果您正苦於以下問題:Java FileSystem類的具體用法?Java FileSystem怎麽用?Java FileSystem使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


FileSystem類屬於org.gradle.internal.nativeintegration.filesystem包,在下文中一共展示了FileSystem類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getUnixMode

import org.gradle.internal.nativeintegration.filesystem.FileSystem; //導入依賴的package包/類
@Override
public int getUnixMode(File f) throws IOException {
    if (f.isDirectory()) {
        return FileSystem.DEFAULT_DIR_MODE;
    } else if (f.exists()) {
        return FileSystem.DEFAULT_FILE_MODE;
    } else {
        throw new FileNotFoundException(String.format("File '%s' not found.", f));
    }
}
 
開發者ID:lxxlxx888,項目名稱:Reer,代碼行數:11,代碼來源:FallbackStat.java

示例2: getMode

import org.gradle.internal.nativeintegration.filesystem.FileSystem; //導入依賴的package包/類
public int getMode() {
    int unixMode = entry.getUnixMode() & 0777;
    if (unixMode == 0) {
        //no mode infos available - fall back to defaults
        if (isDirectory()) {
            unixMode = FileSystem.DEFAULT_DIR_MODE;
        } else {
            unixMode = FileSystem.DEFAULT_FILE_MODE;
        }
    }
    return unixMode;
}
 
開發者ID:lxxlxx888,項目名稱:Reer,代碼行數:13,代碼來源:ZipFileTree.java

示例3: parser

import org.gradle.internal.nativeintegration.filesystem.FileSystem; //導入依賴的package包/類
public static NotationParser<Object, Object> parser(FileSystem fileSystem) {
    return NotationParserBuilder
            .toType(Object.class)
            .typeDisplayName("a File or URI")
            .converter(new FileOrUriNotationConverter(fileSystem))
            .toComposite();
}
 
開發者ID:lxxlxx888,項目名稱:Reer,代碼行數:8,代碼來源:FileOrUriNotationConverter.java

示例4: contains

import org.gradle.internal.nativeintegration.filesystem.FileSystem; //導入依賴的package包/類
public static boolean contains(FileSystem fileSystem, DirectoryTree tree, File file) {
    String prefix = tree.getDir().getAbsolutePath() + File.separator;
    if (!file.getAbsolutePath().startsWith(prefix)) {
        return false;
    }

    RelativePath path = RelativePath.parse(true, file.getAbsolutePath().substring(prefix.length()));
    return tree.getPatterns().getAsSpec().isSatisfiedBy(new DefaultFileTreeElement(file, path, fileSystem, fileSystem));
}
 
開發者ID:lxxlxx888,項目名稱:Reer,代碼行數:10,代碼來源:DirectoryTrees.java

示例5: DirectoryFileTree

import org.gradle.internal.nativeintegration.filesystem.FileSystem; //導入依賴的package包/類
DirectoryFileTree(File dir, PatternSet patternSet, Factory<DirectoryWalker> directoryWalkerFactory, FileSystem fileSystem, boolean postfix) {
    this.patternSet = patternSet;
    this.dir = dir;
    this.directoryWalkerFactory = directoryWalkerFactory;
    this.fileSystem = fileSystem;
    this.postfix = postfix;
}
 
開發者ID:lxxlxx888,項目名稱:Reer,代碼行數:8,代碼來源:DirectoryFileTree.java

示例6: CopyFileVisitorImpl

import org.gradle.internal.nativeintegration.filesystem.FileSystem; //導入依賴的package包/類
public CopyFileVisitorImpl(CopySpecResolver spec, CopyActionProcessingStreamAction action, Instantiator instantiator, FileSystem fileSystem) {
    this.copySpecResolver = spec;
    this.action = action;
    this.instantiator = instantiator;
    this.fileSystem = fileSystem;
}
 
開發者ID:lxxlxx888,項目名稱:Reer,代碼行數:7,代碼來源:CopyFileVisitorImpl.java

示例7: getUnixMode

import org.gradle.internal.nativeintegration.filesystem.FileSystem; //導入依賴的package包/類
public int getUnixMode(File f) throws IOException {
    if (f.isDirectory()) {
        return FileSystem.DEFAULT_DIR_MODE;
    } else if (f.exists()) {
        return FileSystem.DEFAULT_FILE_MODE;
    } else {
        throw new FileNotFoundException(String.format("File '%s' not found.", f));
    }
}
 
開發者ID:Pushjet,項目名稱:Pushjet-Android,代碼行數:10,代碼來源:FallbackStat.java

示例8: getMode

import org.gradle.internal.nativeintegration.filesystem.FileSystem; //導入依賴的package包/類
public int getMode() {
    int unixMode = entry.getUnixMode() & 0777;
    if(unixMode == 0){
        //no mode infos available - fall back to defaults
        if(isDirectory()){
            unixMode = FileSystem.DEFAULT_DIR_MODE;
        }else{
            unixMode = FileSystem.DEFAULT_FILE_MODE;
        }
    }
    return unixMode;
}
 
開發者ID:Pushjet,項目名稱:Pushjet-Android,代碼行數:13,代碼來源:ZipFileTree.java

示例9: create

import org.gradle.internal.nativeintegration.filesystem.FileSystem; //導入依賴的package包/類
public static NotationParser<Object, Object> create(FileSystem fileSystem) {
    return NotationParserBuilder
            .toType(Object.class)
            .typeDisplayName("a File or URI")
            .converter(new FileOrUriNotationParser(fileSystem))
            .toComposite();
}
 
開發者ID:Pushjet,項目名稱:Pushjet-Android,代碼行數:8,代碼來源:FileOrUriNotationParser.java

示例10: createLink

import org.gradle.internal.nativeintegration.filesystem.FileSystem; //導入依賴的package包/類
public void createLink(String target) {
    NativeServices.getInstance().get(FileSystem.class).createSymbolicLink(this, new File(target));
}
 
開發者ID:lxxlxx888,項目名稱:Reer,代碼行數:4,代碼來源:TestFile.java

示例11: getFileSystem

import org.gradle.internal.nativeintegration.filesystem.FileSystem; //導入依賴的package包/類
@Inject
protected FileSystem getFileSystem() {
    throw new UnsupportedOperationException();
}
 
開發者ID:lxxlxx888,項目名稱:Reer,代碼行數:5,代碼來源:InstallExecutable.java

示例12: getFileSystem

import org.gradle.internal.nativeintegration.filesystem.FileSystem; //導入依賴的package包/類
@Inject
protected FileSystem getFileSystem() {
    // Decoration takes care of the implementation
    throw new UnsupportedOperationException();
}
 
開發者ID:lxxlxx888,項目名稱:Reer,代碼行數:6,代碼來源:Delete.java

示例13: DefaultClasspathSnapshotter

import org.gradle.internal.nativeintegration.filesystem.FileSystem; //導入依賴的package包/類
public DefaultClasspathSnapshotter(FileHasher hasher, StringInterner stringInterner, FileSystem fileSystem, DirectoryFileTreeFactory directoryFileTreeFactory) {
    super(hasher, stringInterner, fileSystem, directoryFileTreeFactory);
}
 
開發者ID:lxxlxx888,項目名稱:Reer,代碼行數:4,代碼來源:DefaultClasspathSnapshotter.java

示例14: AbstractFileCollectionSnapshotter

import org.gradle.internal.nativeintegration.filesystem.FileSystem; //導入依賴的package包/類
public AbstractFileCollectionSnapshotter(FileHasher hasher, StringInterner stringInterner, FileSystem fileSystem, DirectoryFileTreeFactory directoryFileTreeFactory) {
    this.hasher = hasher;
    this.stringInterner = stringInterner;
    this.fileSystem = fileSystem;
    this.directoryFileTreeFactory = directoryFileTreeFactory;
}
 
開發者ID:lxxlxx888,項目名稱:Reer,代碼行數:7,代碼來源:AbstractFileCollectionSnapshotter.java

示例15: DefaultGenericFileCollectionSnapshotter

import org.gradle.internal.nativeintegration.filesystem.FileSystem; //導入依賴的package包/類
public DefaultGenericFileCollectionSnapshotter(FileHasher hasher, StringInterner stringInterner, FileSystem fileSystem, DirectoryFileTreeFactory directoryFileTreeFactory) {
    super(hasher, stringInterner, fileSystem, directoryFileTreeFactory);
}
 
開發者ID:lxxlxx888,項目名稱:Reer,代碼行數:4,代碼來源:DefaultGenericFileCollectionSnapshotter.java


注:本文中的org.gradle.internal.nativeintegration.filesystem.FileSystem類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。