Reading Directory Listing of a Remote Server folder in Obj-C - iphone

I want to list all the files contained in a folder at a remote server and save the URLs of the files in an array.
Any idea, how can I do that?

Related

How to retrieve a deleted file from ~/.vscode-server/data/User/History

I deleted a folder including subfolders from VSC project while developing remotely. I read that I can retrieve the files from the history: ~/.vscode-server/data/User/History. How should I do this?

VSTS Minimatch pattern to exclude .git folder

I'm using VSTS and the build task FTP Upload. When the files and folders are uploaded to my FTP server the .git folder is always copied to the server too.
I tried to exclude the .git folder with file pattern like following:
**
!(**/.git/**)
I don't know why it does not work but is there any way to tell the task with minimatch pattern to exclude folder explicitly?
The minimatch pattern for the file patterns option in FTP Upload task only can exclude the folders. Such as if you use the !**\.git\** as File patterns, it will only remove the .git folder and the subfolders in it, but the files in these folder still upload to FTP server.
If you don’t want the .git folder (including the files in it) to be uploaded to FTP, you can add a Copy Files task before FTP Upload task. Detail settings as below:
Copy Files task
Source Folder: $(Build.SourcesDirectory)
Contents:
**
!**\.git\**
Target Folder: $(Build.ArtifactStagingDirectory)\upload
FTP Upload task
You just need to change below settings,
Source folder: $(Build.ArtifactStagingDirectory)\upload
File patterns: **
Now exclude the files in .git folder, all the files and folders are upload to FTP server.

Ignore files within the 'Delete Files Task'

As part of my install scripts for Visual Studio Online (VSO / VSTS) I delete the files in my directory shortly after uninstalling the services.
We have configuration files and logs that I'd like to preserve but everytime I try to tell the 'Delete Files Task' to ignore those files it deletes them anyway.
What I want is for ALL files in the Bifrost directory to be deleted except for
The Logs folder
App.Connections.Config
App.Queues.Config
Can someone help please?
If the files you want to delete are located in the agent folder or the subfolder of the agent machine, you can use Delete Files Task. Because the Source Folder of Delete Files Task can only be specified for the agent machine.
If the files you want to delete are located on another remote machine, you should use Powershell task or RemoteDelete task to delete the files.
For powershell task, there are many powershell script on the web to delete files from remote machine.
For RemoteDelete task, you can set as below:
Input your remote machine’s IP, username and password.
Path: the directory for Bifrost folder, such as D:\test\Bitfrost
Include Items: folders and files you want to delete and separate with comma (,). Such as delete folder temp and file *.txt, you can specify with temp,*.txt
Exculde Items: folders and files you want to keep. For you situation, you
should specify as Logs,App.Connections.Config,App.Queues.Config
Note: the Include Items option can't leave empty or use **, otherwise it will delete all the files and folders in Bifrost.

What do I do with the Inbox folder in the Documents Directory if I want the User to Be Allowed to Manage Folders and Files?

I have an application in which users are able to use a file manager to create, modify, and remove directories as well as files. I notice that when importing files from external applications, a system folder Inbox is automatically generated preventing users from both deleting the folder and/or naming a folder called Inbox. Should I instead create a subdirectory in the Document path directory and have the file manager consider that folder as the document root path? How do other apps achieve this?
If you are allowing users to create their own documents and directories within your Sandbox's Documents Directory, it might be good to do what you suggested and create a separate directory within Documents that will be designated for user-editable data.
For example, perhaps add a 'User' directory within Documents, and then use that as the root directory for user files and directories.
Apple's documentation states the following about /Documents/Inbox:
Use this directory to access files that your app was asked to open by outside entities. Specifically, the Mail program places email attachments associated with your app in this directory. Document interaction controllers may also place files in it.
Your app can read and delete files in this directory but cannot create new files or write to existing files. If the user tries to edit a file in this directory, your app must silently move it out of the directory before making any changes.
The contents of this directory are backed up by iTunes.
From the File System Programming Guide.

Why does .meteor have a .gitignore file?

I am creating a new meteor app and would like to put the whole thing under git source control. When cloning a working copy of my meteor directory, meteor gives : run: You're not in a Meteor project directory.
After inspecting the .meteor directory, I see that the files in here are being excluded in my local clone.
Is there a particular reason this is done?
as #Swadq already pointed about, the .meteor directory is Meteor's directory. It contains a folder and a file.
The local directory contains the compiled version of your application and some database information (lock-file and the actual raw data of mongodb). This of course should not be included in your VCS.
The package file contains all packages meteor should load for your application. This is of course important and must be included in your VCS. More importantly: this file is checked for to determine if the current directory is a meteor application. If you don't include this you'll loose the packages you relay on and the ability to simply run the app. using meteor.
So ideally your .gitignore file only should contain .meteor\local but not .meteor\packages. When using meteorite the .gitignore file should contain .meteor\meteorite as well.