What are all the possible reason for IMAP Folder isn't exist - imap

I have facing one problem. While connecting to the IMAP store, we can get the number of Folders in user email account. But some folders aren't exist.
Code :
Folder folder = store.getFolder("Sent Items");
System.out.println(folder.exists());
folder.open(folder.READ_ONLY);
System.out.println("Got Message Subject :" + folder.getMessage(2).getSubject());
Result :
false
Got Message Subject : Test Email
I can able to get many folder. But some folders are not exists eventhough i can read that folder. I don't know why its happening. Please advise

A folder doesn't have to be selectable in order to exist, and some are not. (A selectable folder is one that can contain messages.) For example, if a/b and a/c both are selectable folders, then some servers will present a parent folder called a, and depending on the server, a may be either unselectable or empty.
If a folder is selectable in general, that still doesn't mean you can select it. The access control list may be such that you're permitted to see the name of the folder but not its contents.

Related

How do I get informed about deleted/moved IMAP folder

Using IMAP, how can I figure out if a mailbox has been moved or deleted by another client?
The LIST command simply does not list a deleted mailbox any more.
Exactly. You have to remember what folders you know about. Next time you do a LIST, any that are missing have been deleted.
Additionally, you should be tracking every folder's UIDVALIDITY value. If it changes, that folder is not the same one you know about. It may have been renumbered, deleted and recreated, or deleted and replaced by a renamed folder.
In either case, you should dump any cached information you know about that folder.
There is not, in general, any way to track folders that have been renamed by another client. You can only detect that a folder is missing and there is a folder with a new name. IMAP simply does not provide enough information to correlate them. Tracking messages and folders across moves does not appear to have been a design goal of IMAP.

Electron only allow save to a folder

I need for my user to only be able to select a folder to be saved. Is it possible in electron to only allow folders to be selected via dialog#showSaveDialog? Filters only work on file extensions, there's no mention of filtering folders only.
I use the showOpenDialog with the openDirectory flag for this.
Logically it doesn't make sense to "save" a folder since it is just a
virtual "container". Allowing the user to select a folder to "open" in order to "save" data into it is the usual flow.

Discard hidden folders with Outlook REST Api

When retrieving folders list with Outlook REST API (beta endpoint)
https://outlook.office365.com/api/beta/me/MailFolders
I get the complete list of folders. But I also get some hidden/ignored folders that are not displayed in usual Outlook clients. I would like to ignore such folders as well.
I tried to forge a request using SingleExtendedProperty and PigTagAttributeHidden
https://outlook.office365.com/api/beta/me/MailFolders?$select=Id,DisplayName,ParentFolderId,ChildFolderCount,UnreadItemCount,TotalItemCount,SingleValueExtendedProperties&$expand=SingleValueExtendedProperties($filter=(PropertyId eq 'Boolean 0x10F4'))
In the results this property is always marked as false even for these "ignored" folders.
Is there another way or fix to achieve this?
I went through the folders reported, and none of them were hidden. Basically they fell into two categories:
System folders like Sync Issues and Conflicts. These aren't hidden, but OWA doesn't show them in it's folder view. OWA handles these specially. The suggestion for a REST app that wants to also handle these specially and not show them is to check the WellKnownName property. All of these have a constant value for that property, so they can be selectively filtered.
Add-in folders. These were created by a module extension add-in. They actually reside in a folder structure like:
/WebExtAddIns (Hidden)
|__/{GUID id of addin} (Hidden)
|__/{Name of module extension tab} (Visible)
The REST API includes the {Name of module extension tab} folder because it's marked visible, even though it's parent folder is hidden. I've reported this to our developers and we are investigating improving this scenario. In the meantime, you can filter these out by making sure that the ParentFolderId matches either the Id of another folder in the folder results OR the ParentFolderId of the Inbox folder.

How do you save file on server?

I am saving images on file and i am creating first folder which has Guid name for avoiding to duplicate file names. And entities hold reference src of image.
I feel that creating folder and giving guid name is wrong from point of performance. So how i have to avoid duplicate names ?
And second problem is the project seperated into 2 project. One is admin and other for user interface so i can not access my saved files from user interface. What is best practice about these problems ?
About the first problem, I think you could create a folder per user and replace the existing file, asking user confermation.
The second problem can be solved using a NFS or a shared directory where the admin and the user application can both read and write files (and you need to develope a component that retrieve the files and return them to your web apps).

Sharepoint's "New Folder" doesn't ask for a required field

I am using Web Part Connections to filter documents in a documents library in SharePoint. To do this, there's a column that is required, which I've named "related contact." Here's my problem: When I go add a New Folder (instead of just a document) SharePoint only asks me for a title for the Folder. The "related contact" column (which is required for the documents) doesn't even appear. Since the info on that column is empty, web part connections doesn't see the folder at all. Is there any way to make the Folder ask for another field at the time of creation?
Thanks
-V
Did you try creating a new folder content type with those required fields and trying to use that (and perhaps turn off the standard folders)?
Perhaps this page will help you: SharePoint folders and metadata.
Folders are one-dimensional. They are virtual containers for your documents, but aren't objects in your library that contain actual metadata.
Instead of using folders, I would recommend adding a column to your library that would mimic the names of the folders. From there, you can sort/filter/group/query the contents of that library. If users are sticklers for the folder structure, you could create a View that groups the documents by that new column, which would give you the appearance of folders.

Resources