directory

How can recursively search directories with multiple wildcards?

ε祈祈猫儿з 提交于 2019-12-31 02:58:04
问题 Using C# (.NET), how can I search a file system given a directory search mask like this: (?) \\server\Scanner\images\*Images\*\*_* For example, I need to first find all top-level directories: \\server\Scanner\images\Job1Images \\server\Scanner\images\Job2Images ...then I need to procede further with the search mask: \\server\Scanner\images\Job1Images\*\*_* \\server\Scanner\images\Job2Images\*\*_* This doesn't seem too complicated but I can't figure it out for the life of me... As mentioned

make folder shared google drive api v3?

…衆ロ難τιáo~ 提交于 2019-12-31 02:43:06
问题 I can make a folder using this code var request = gapi.client.request({ 'path': '/drive/v3/files/', 'method': 'POST', 'headers': { 'Content-Type': 'application/json' //'Authorization': 'Bearer ' + token }, 'body':{ "name" : "copy", "mimeType" : "application/vnd.google-apps.folder", } }); request.execute(function(resp) { console.log(resp); //document.getElementById("info").innerHTML = "Created folder: " + resp.title; }); but I cant figure out for the life of me how to make the folder shared to

Poco学习随笔——Path类

旧巷老猫 提交于 2019-12-30 23:39:07
POCO库的一些学习、整理和总结: POCO库的文件操作主要是2个类:Path和File。 PS:不同操作系统中数据代表的数据不同,POCO目前支持Windows、UNIX相关系统和OpenVMS。我只关心UNIX和Windows,还有很多函数一看就知道意思,在这里就不多做解释了。 #include <Poco/Path> #include <Poco/File> 一、 Path由以下几点组成: 1. node name UNIX下,此字段没有意义; 2. device name windows 驱动盘符,比如C盘等; UNIX下,无意义; 3. directory list 4. file name 5. style 操作系统类型 6. Kind absolute或者relative, file或者directory; 二、 路径的表示 1. absolute path(绝对路径) 2. relative path(相对路径) 注:2种路径方式可以互相转换。 三、 例子 --------------------------- Path: C:\Windows\system32\cmd.exe Style: Windows Kind: absolute, to file Node Name: – Device Name: C Directory List: Windows,

JAVA ANDROID - get list files of a folder

允我心安 提交于 2019-12-30 11:11:17
问题 I want to display images of different folders in a GridView , but I don't know what I need to do for get a list with the name of files that are inside a folder in drawable. 回答1: this method will give you a list containing a list of dir folders and also sub folders: public void listf(String directoryName, ArrayList<File> files) { File directory = new File(directoryName); // get all the files from a directory File[] fList = directory.listFiles(); for (File file : fList) { if (file.isFile()) {

how to show the availble files in Android memory with Firemonkey

可紊 提交于 2019-12-30 10:46:06
问题 In Delphi for Windows one has the TOpenDialog and the commands such as FindFirst . In Firemonky/Android there is no TOpenDialog , but according to many forums FindFirst` should exist. However there are more who have problems with it, but no solution: In Windows the following functions properly: var iResult,n:integer; Filenaam,s:string; sr: TSearchRec; begin with form1 do begin L_toonactie.Text:='start file list'; M_filelist.lines.Clear; Filenaam:= System.IOUtils.tpath.GetDocumentsPath+'

Ignore hidden files and directories with obj-c

北城以北 提交于 2019-12-30 08:51:07
问题 How can I execute hidden directory and files programmatically? i.e: .DS_Store I want to execute all the hidden files and directories which start with the "." Thank you for your help in advance 回答1: Use NSFileManager with NSDirectoryEnumerationSkipsHiddenFiles . For example: NSFileManager *fileManager = [NSFileManager defaultManager]; NSArray *theFiles = [fileManager contentsOfDirectoryAtURL:[NSURL fileURLWithPath:@"/Users/Anne/Desktop/"] includingPropertiesForKeys:[NSArray arrayWithObject

ExternalContext#redirect() does not redirect to parent directory

喜你入骨 提交于 2019-12-30 08:34:08
问题 I have two pages: String page1 = "user/newuser.jsf"; String page2 = "department/newdepartment.jsf"; If I redirect to page1 like this: FacesContext.getCurrentInstance().getExternalContext().redirect(page1); URL changes to localhost:8080/NavFile/user/newuser.jsf . On this page I redirect to page2 : FacesContext.getCurrentInstance().getExternalContext().redirect(page2); URL changes to localhost:8080/NavFile/user/department/newdepartment.jsf . But there is no user/department directory in my

ExternalContext#redirect() does not redirect to parent directory

筅森魡賤 提交于 2019-12-30 08:34:01
问题 I have two pages: String page1 = "user/newuser.jsf"; String page2 = "department/newdepartment.jsf"; If I redirect to page1 like this: FacesContext.getCurrentInstance().getExternalContext().redirect(page1); URL changes to localhost:8080/NavFile/user/newuser.jsf . On this page I redirect to page2 : FacesContext.getCurrentInstance().getExternalContext().redirect(page2); URL changes to localhost:8080/NavFile/user/department/newdepartment.jsf . But there is no user/department directory in my

Show folder's contents in finder using Swift

自古美人都是妖i 提交于 2019-12-30 08:14:43
问题 I want to be able to select a folder and show its contents in the Finder. I have managed to select the folder itself and select a file within the folder. But I don't know how to show the contents of an empty folder. e.g. Folder A/Folder B I want to display the contents of folder Folder B (which could be empty). I have written the following code: func showFolder(fileName : String) { var dataPath = homeDirectory.stringByAppendingPathComponent(fileName) var urlPath = NSURL(fileURLWithPath:

Show folder's contents in finder using Swift

一个人想着一个人 提交于 2019-12-30 08:14:27
问题 I want to be able to select a folder and show its contents in the Finder. I have managed to select the folder itself and select a file within the folder. But I don't know how to show the contents of an empty folder. e.g. Folder A/Folder B I want to display the contents of folder Folder B (which could be empty). I have written the following code: func showFolder(fileName : String) { var dataPath = homeDirectory.stringByAppendingPathComponent(fileName) var urlPath = NSURL(fileURLWithPath: