Google Drive - Accessing file tree entries and their type - objective-c

How does one retrieve the file tree for a google drive account using the Google Drive iOS API?
I am able to access the list of files from what I have read on the developer site for Google Drive and through the sample apps, but I am not sure how one gets the file tree and how to distinguish if an entry is a folder or file.

You can check the mimeType property of the file resource to distinguish between files and folders. Folders will list application/vnd.google-apps.folder as their MIME type:
https://developers.google.com/drive/folder
You can use the Parents collection to list the parents of a file and build a tree. Remember that a file can have multiple parents, i.e. be included in multiple folders:
https://developers.google.com/drive/v2/reference/parents/list

Related

MS Graph API Search File Name not Content

I want to return a list of files within a folder on a OneDrive site that match a search pattern using MS Graph API.
The files can be up to a few levels deep in sub folders.
The files are named consistently, for example starting with the letters WKP. My searches always also return files that don't have WKP in the file name. I assume wkp is in the content somewhere for these files.
I can't find anything in the MS Graph docs that tells me how to search only the file names and not the content.
I am using this endpoint /v1.0/sites/{siteId}/drive/items/{ItemId}/search(q='WKP')
Is there a way to build the query so that it only looks at the file name? I tried q='filename:WKP'
Thanks,

Vaadin 8 multiupload with folder selection

I need to upload files and folders to the server while preserving the hierarchy. At the moment I am using a plugin multiFileUpload that allows you to upload multiple files at the same time, but it ignores the selected folders. I know that neither vaadin nor Html5 has a universal solution that works everywhere for uploading folders.
I'm ready to write my own solution, but climbed the Internet can't find a way to display file selection (perhaps there will a JavaScript call) but the main question - is it possible somehow to POST a request Vaadin's and upload files by way of creating subfolders in which they were?
You can only upload files, not folders. It's simply not doable.
You can upload any number of files, but they won't be structured into folders.
I see two possibilities how you could still achieve what you need if you really wanted to, even if it changes the user experience a bit:
Let the user upload a .zip file of his folder structure. When they upload it, you unzip it on the server side and have now access to all the files in the correct folder structure.
Let the user upload all his files within his folder structure. After all files have been uploaded, You display all the files in a TreeGrid where the user can recreate the original structure using Drag-and-Drop or similar.

Listing S3 folders via Java API, excluding files

I have an AWS S3 bucket with several folders, subfolders, and files. I want to get a list of all subfolders of a folder, excluding files. I think I understand that the S3 key concept makes such distinctions iffy, but the AWS web gui allows users to create folders without files.
The listObject() method defined in com.amazonaws.services.s3.AmazonS3 returns an ObjectListing with a list of S3ObjectSummary for the actual files. Knowing the delimiter, it would be possible to split the keys into a folder hierarchy and filenames, but this appears complicated and error-prone.
Is there an API to get a list of folders without parsing the key property of S3ObjectSummary?
'Objects' in S3 (ie files) do not exist on S3 in actual folders - the 'Keys' for those objects are all at the same level of the hierarchy, and contain slashes which are then displayed to the user on the console as if they were in folders. To find only the 'folders' as opposed to the files, you will need to work out for each object in the bucket whether there are any other files with the same key but with a slash (/) and then more characters. So eg if you had objects with keys like:
a
b
b/c
b/c/d1
b/c/d2
you would only know c is a folder because there are other objects 'inside' it (ie with extra characters after the slash.

list files and folders in one hit using one drive

I am currently integrating one drive with my application.
I am searching for an endpoint where i can get all the files and folders of the user's one drive.
I currently found an endpoint where I can use root/children to get the root files along with the nested folder count.
Is there any possible endpoint to get all files and folders ?
If you want to discover all files and folders within a drive, your best bet is to use the delta API. It'll end up returning all items, potentially over multiple calls depending on the size of the drive, and at the end of it you can use it to efficiently discover new or updated files and folders that are added in the future.

How to make files accessible to all users on Visual Basic app

I am attempting to make an instructional app for the call canter that I work at. Part of the code allows users to display information through the use of several files in our directory with drop down combo boxes.
For instance, a small portion of the code is similar to this (I did not save the app and bring it home so I am going off memory):
If cboGlossaryTerm.SelectedItem("MSN")Then
Process.Start("S:\MSN.pdf")
End If
I put the pdf files in My Resources and the Word files are added under the Solution folder.
I am using filepaths in the code as well.
(I attempted to save the pdf files in the Solutions folder but the pdf was not compatible.
With me adding the files this way, will users who do not have access to the S drive folder be able to display the files? Also, will the files remain accessible in the program if they are deleted from the S drive? If not, how should I be referencing the files in my project? Do I have to reference the pdf files from My Resources? If so, how do I do that in an If-Then statement similar to the one above?
from what you have there it doesn't look like the pdfs in the S:\ would be available to anyone who doesn't have the drive mapped on their local machine.
as for if the files are deleted, if they are being loaded from the S:\ then when they are deleted from there the program will not be able to find them to load them.
if the program is being installed on the local machines you might want to look at just including the pdfs in the installer and accessing them through the program files path.