Java Code Examples for org.eclipse.core.filesystem.EFS#ATTRIBUTE_EXECUTABLE
The following examples show how to use
org.eclipse.core.filesystem.EFS#ATTRIBUTE_EXECUTABLE .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AdvancedFilesTest.java From orion.server with Eclipse Public License 1.0 | 5 votes |
private JSONObject getFileMetadataObject(Boolean readonly, Boolean executable) throws JSONException { Map<String, Object> attributes = new HashMap<String, Object>(); //only test attributes supported by the local file system of the test machine int attrs = EFS.getLocalFileSystem().attributes(); if (readonly != null && ((attrs & EFS.ATTRIBUTE_READ_ONLY) != 0)) { attributes.put("ReadOnly", String.valueOf(readonly)); } if (executable != null && ((attrs & EFS.ATTRIBUTE_EXECUTABLE) != 0)) { attributes.put("Executable", String.valueOf(executable)); } JSONObject json = new JSONObject(); json.put("Attributes", attributes); return json; }
Example 2
Source File: VirtualFileSystem.java From APICloud-Studio with GNU General Public License v3.0 | 5 votes |
@Override public int attributes() { if (attributes != -1) return attributes; attributes = 0; attributes |= EFS.ATTRIBUTE_READ_ONLY; attributes |= EFS.ATTRIBUTE_EXECUTABLE; attributes |= EFS.ATTRIBUTE_SYMLINK | EFS.ATTRIBUTE_LINK_TARGET; return attributes; }