本文整理了Java中ch.cyberduck.core.Local.list()
方法的一些代码示例,展示了Local.list()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Local.list()
方法的具体详情如下:
包路径:ch.cyberduck.core.Local
类名称:Local
方法名:list
暂无
代码示例来源:origin: iterate-ch/cyberduck
public AttributedList<Local> list(final Filter<String> filter) throws AccessDeniedException {
return this.list(path, filter);
}
代码示例来源:origin: iterate-ch/cyberduck
public AttributedList<Local> list() throws AccessDeniedException {
return this.list(new NullFilter<>());
}
代码示例来源:origin: iterate-ch/cyberduck
@Override
public AttributedList<Local> list(final Filter<String> filter) throws AccessDeniedException {
final NSURL resolved;
try {
resolved = this.lock(true);
if(null == resolved) {
return super.list(filter);
}
final AttributedList<Local> list = super.list(resolved.path(), filter);
this.release(resolved);
return list;
}
catch(AccessDeniedException e) {
log.warn(String.format("Failure obtaining lock for %s. %s", this, e.getMessage()));
return super.list(filter);
}
}
代码示例来源:origin: iterate-ch/cyberduck
public List<License> open() throws AccessDeniedException {
final List<License> keys = new ArrayList<License>();
if(folder.exists()) {
for(Local key : folder.list().filter(filter)) {
keys.add(this.open(key));
}
}
return keys;
}
代码示例来源:origin: iterate-ch/cyberduck
public List<Local> list() {
final List<Local> keys = new ArrayList<>();
try {
for(Local file : directory.list(new Filter<String>() {
@Override
public boolean accept(final String file) {
代码示例来源:origin: iterate-ch/cyberduck
/**
* FireFTP settings are in Firefox/Profiles/.*\.default/fireFTPsites.dat
*/
@Override
protected void parse(final ProtocolFactory protocols, final Local folder) throws AccessDeniedException {
for(Local settings : folder.list().filter(new NullFilter<Local>() {
@Override
public boolean accept(Local file) {
return file.isDirectory();
}
})) {
for(Local child : settings.list().filter(new NullFilter<Local>() {
@Override
public boolean accept(Local file) {
if(file.isFile()) {
return "fireFTPsites.dat".equals(file.getName());
}
return false;
}
})) {
this.read(protocols, child);
}
}
}
代码示例来源:origin: iterate-ch/cyberduck
@Override
public List<TransferItem> list(final Session<?> session, final Path remote,
final Local directory, final ListProgressListener listener) throws BackgroundException {
if(log.isDebugEnabled()) {
log.debug(String.format("List children for %s", directory));
}
if(directory.isSymbolicLink()) {
final Symlink symlink = session.getFeature(Symlink.class);
if(new UploadSymlinkResolver(symlink, roots).resolve(directory)) {
if(log.isDebugEnabled()) {
log.debug(String.format("Do not list children for symbolic link %s", directory));
}
// We can resolve the target of the symbolic link and will create a link on the remote system
// using the symlink feature of the session
return Collections.emptyList();
}
}
final List<TransferItem> children = new ArrayList<TransferItem>();
for(Local local : directory.list().filter(comparator, filter)) {
children.add(new TransferItem(new Path(remote, local.getName(),
local.isDirectory() ? EnumSet.of(Path.Type.directory) : EnumSet.of(Path.Type.file)), local));
}
return children;
}
代码示例来源:origin: iterate-ch/cyberduck
log.debug(String.format("Load profiles from %s", bundle));
for(Local f : bundle.list().filter(new ProfileFilter())) {
try {
final Profile profile = ProfileReaderFactory.get().read(f);
log.debug(String.format("Load profiles from %s", library));
for(Local f : library.list().filter(new ProfileFilter())) {
try {
final Profile profile = ProfileReaderFactory.get().read(f);
代码示例来源:origin: iterate-ch/cyberduck
final PathMatcher matcher = FileSystems.getDefault().getPathMatcher(String.format("glob:%s", FilenameUtils.getName(path)));
final Set<TransferItem> items = new HashSet<TransferItem>();
for(Local file : directory.list(new NullFilter<String>() {
@Override
public boolean accept(final String file) {
代码示例来源:origin: iterate-ch/cyberduck
for(Local file : SupportDirectoryFinderFactory.get().find().list().filter(new Filter<Local>() {
@Override
public boolean accept(final Local file) {
final Local bundle = ApplicationResourcesFinderFactory.get().find();
if(bundle.exists()) {
for(Local key : bundle.list().filter(new LicenseFilter())) {
log.info(String.format("Add bundled registration key %s", key));
final License registration = this.open(key);
代码示例来源:origin: iterate-ch/cyberduck
@Override
protected void parse(final ProtocolFactory protocols, final Local folder) throws AccessDeniedException {
for(Local child : folder.list().filter(new NullFilter<Local>() {
@Override
public boolean accept(Local file) {
if(file.isDirectory()) {
return false;
}
return "ini".equals(file.getExtension());
}
})) {
if(child.isDirectory()) {
this.parse(protocols, child);
}
else {
this.read(protocols, child);
}
}
}
代码示例来源:origin: iterate-ch/cyberduck
@Override
protected void parse(final ProtocolFactory protocols, final Local folder) throws AccessDeniedException {
for(Local child : folder.list().filter(new Filter<Local>() {
@Override
public boolean accept(Local file) {
if(file.isDirectory()) {
return true;
}
return "xml".equals(file.getExtension());
}
@Override
public Pattern toPattern() {
return Pattern.compile(".*\\.xml");
}
})) {
if(child.isDirectory()) {
this.parse(protocols, child);
}
else {
this.read(protocols, child);
}
}
}
代码示例来源:origin: iterate-ch/cyberduck
@Override
public void load() throws AccessDeniedException {
if(log.isInfoEnabled()) {
log.info(String.format("Reloading %s", folder));
}
this.lock();
try {
if(!folder.exists()) {
new DefaultLocalDirectoryFeature().mkdir(folder);
}
final AttributedList<Local> groups = folder.list().filter(
new NullFilter<Local>() {
@Override
public boolean accept(final Local file) {
return file.isDirectory();
}
}
);
for(Local group : groups) {
this.add(new FolderBookmarkCollection(group, group.getName()));
}
}
finally {
this.unlock();
}
super.load();
}
代码示例来源:origin: iterate-ch/cyberduck
new DefaultLocalDirectoryFeature().mkdir(folder);
final AttributedList<Local> bookmarks = folder.list().filter(
new Filter<Local>() {
@Override
代码示例来源:origin: iterate-ch/cyberduck
new DefaultLocalDirectoryFeature().mkdir(folder);
final AttributedList<Local> transfers = folder.list().filter(
new Filter<Local>() {
@Override
代码示例来源:origin: iterate-ch/cyberduck
if(local.exists()) {
if(local.isDirectory()) {
if(local.list().isEmpty()) {
内容来源于网络,如有侵权,请联系作者删除!