本文整理汇总了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));
}
}
示例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;
}
示例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();
}
示例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));
}
示例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;
}
示例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;
}
示例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));
}
}
示例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;
}
示例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();
}
示例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));
}
示例11: getFileSystem
import org.gradle.internal.nativeintegration.filesystem.FileSystem; //导入依赖的package包/类
@Inject
protected FileSystem getFileSystem() {
throw new UnsupportedOperationException();
}
示例12: getFileSystem
import org.gradle.internal.nativeintegration.filesystem.FileSystem; //导入依赖的package包/类
@Inject
protected FileSystem getFileSystem() {
// Decoration takes care of the implementation
throw new UnsupportedOperationException();
}
示例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);
}
示例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;
}
示例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);
}