本文整理汇总了Java中java.nio.file.Files.isHidden方法的典型用法代码示例。如果您正苦于以下问题:Java Files.isHidden方法的具体用法?Java Files.isHidden怎么用?Java Files.isHidden使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.nio.file.Files
的用法示例。
在下文中一共展示了Files.isHidden方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: shouldFilter
import java.nio.file.Files; //导入方法依赖的package包/类
/**
* @see org.alfresco.repo.bulkimport.ImportFilter#shouldFilter(org.alfresco.repo.bulkimport.ImportableItem)
*/
public boolean shouldFilter(final ImportableItem importableItem)
{
boolean result = false;
if (importableItem.getHeadRevision().contentFileExists())
{
Path file = importableItem.getHeadRevision().getContentFile();
try
{
result = Files.isHidden(file);
}
catch (IOException e)
{
}
}
return(result);
}
示例2: isOtherRoot
import java.nio.file.Files; //导入方法依赖的package包/类
private boolean isOtherRoot(Path dir) throws IOException {
if (!dir.toFile().isDirectory() || Files.isHidden(dir)) {
return false;
}
// Walk through the other roots and check if a parent of this dir is
// already available in other roots to avoid folder duplication
for (Path path : otherRoots) {
if (dir.startsWith(path)) {
return false;
}
}
return true;
}
示例3: scanFolder
import java.nio.file.Files; //导入方法依赖的package包/类
@Override
public LocalFolder scanFolder(Path path, LocalFolderScannerContext context) {
try {
if (Files.isDirectory(path) && !Files.isHidden(path)) {
return new DefaultLocalFolder(path, context.getRootDir(), context.getFileSystemName());
}
} catch (IOException e) {
throw new UncheckedIOException(e);
}
return null;
}
示例4: Solution
import java.nio.file.Files; //导入方法依赖的package包/类
public Solution(String pathToFile) {
try {
Path filePath = Paths.get(pathToFile);
fileData = new ConcreteFileData(Files.isHidden(filePath), Files.isExecutable(filePath),
Files.isDirectory(filePath), Files.isWritable(filePath));
} catch (Exception e) {
fileData = new NullFileData (e);
}
}
示例5: visitFile
import java.nio.file.Files; //导入方法依赖的package包/类
@Override
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
if (!Files.isHidden(file) && Files.exists(file, LinkOption.NOFOLLOW_LINKS)) {
try {
String name = file.toString()
.substring(0, file.toString().lastIndexOf('.'))
.replaceFirst("/images/", "");
byte[] bytes = Files.readAllBytes(file);
packer.pack(name, new Pixmap(bytes, 0, bytes.length));
} catch (GdxRuntimeException e) {
System.err.println("Failed to load file: " + file + " as an image.");
}
}
return FileVisitResult.CONTINUE;
}
示例6: visitFile
import java.nio.file.Files; //导入方法依赖的package包/类
@Override
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
if (!Files.isHidden(file) && Files.exists(file, LinkOption.NOFOLLOW_LINKS)) {
try {
String name = file.toString()
.replaceFirst("/sounds/", "");
int lastIndex = name.lastIndexOf('/');
consumer.accept(name, Gdx.audio.newSound(new PathFileHandle(
lastIndex >= 0 ? name.substring(lastIndex) : name, file)));
} catch (GdxRuntimeException e) {
System.err.println("Failed to load file: " + file + " as a sound.");
}
}
return FileVisitResult.CONTINUE;
}
示例7: isHidden
import java.nio.file.Files; //导入方法依赖的package包/类
/**
* Returns true if the given file exists and is a hidden file
*/
private boolean isHidden(Path file) {
try {
return Files.isHidden(file);
} catch (IOException ioe) {
return false;
}
}
示例8: isHidden
import java.nio.file.Files; //导入方法依赖的package包/类
@Override
public boolean isHidden(Path file) throws IOException {
triggerEx(file, "isHidden");
return Files.isHidden(unwrap(file));
}