本文整理匯總了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));
}