filer/src/constants.js

73 lines
1.7 KiB
JavaScript
Raw Normal View History

2013-05-31 01:38:44 +00:00
define(function(require) {
2013-05-31 19:03:18 +00:00
var O_READ = 'READ';
var O_WRITE = 'WRITE';
var O_CREATE = 'CREATE';
var O_EXCLUSIVE = 'EXCLUSIVE';
var O_TRUNCATE = 'TRUNCATE';
var O_APPEND = 'APPEND';
2013-12-20 08:34:05 +00:00
var XATTR_CREATE = 'CREATE';
var XATTR_REPLACE = 'REPLACE';
2013-05-31 19:03:18 +00:00
2013-05-31 01:38:44 +00:00
return {
2013-11-27 00:12:25 +00:00
FILE_SYSTEM_NAME: 'local',
2013-05-31 01:38:44 +00:00
FILE_STORE_NAME: 'files',
IDB_RO: 'readonly',
IDB_RW: 'readwrite',
WSQL_VERSION: "1",
WSQL_SIZE: 5 * 1024 * 1024,
WSQL_DESC: "FileSystem Storage",
2013-05-31 01:38:44 +00:00
MODE_FILE: 'FILE',
MODE_DIRECTORY: 'DIRECTORY',
MODE_SYMBOLIC_LINK: 'SYMLINK',
MODE_META: 'META',
2013-05-31 01:38:44 +00:00
SYMLOOP_MAX: 10,
2013-05-31 01:38:44 +00:00
BINARY_MIME_TYPE: 'application/octet-stream',
JSON_MIME_TYPE: 'application/json',
ROOT_DIRECTORY_NAME: '/', // basename(normalize(path))
FS_FORMAT: 'FORMAT',
2013-05-31 19:03:18 +00:00
O_READ: O_READ,
O_WRITE: O_WRITE,
O_CREATE: O_CREATE,
O_EXCLUSIVE: O_EXCLUSIVE,
O_TRUNCATE: O_TRUNCATE,
O_APPEND: O_APPEND,
O_FLAGS: {
'r': [O_READ],
'r+': [O_READ, O_WRITE],
'w': [O_WRITE, O_CREATE, O_TRUNCATE],
'w+': [O_WRITE, O_READ, O_CREATE, O_TRUNCATE],
'wx': [O_WRITE, O_CREATE, O_EXCLUSIVE, O_TRUNCATE],
'wx+': [O_WRITE, O_READ, O_CREATE, O_EXCLUSIVE, O_TRUNCATE],
'a': [O_WRITE, O_CREATE, O_APPEND],
'a+': [O_WRITE, O_READ, O_CREATE, O_APPEND],
'ax': [O_WRITE, O_CREATE, O_EXCLUSIVE, O_APPEND],
'ax+': [O_WRITE, O_READ, O_CREATE, O_EXCLUSIVE, O_APPEND]
2013-05-31 19:03:18 +00:00
},
2013-05-31 01:38:44 +00:00
2013-12-20 08:34:05 +00:00
XATTR_CREATE: XATTR_CREATE,
XATTR_REPLACE: XATTR_REPLACE,
2013-05-31 01:38:44 +00:00
FS_READY: 'READY',
FS_PENDING: 'PENDING',
FS_ERROR: 'ERROR',
2014-02-19 22:29:11 +00:00
SUPER_NODE_ID: '00000000-0000-0000-0000-000000000000',
ENVIRONMENT: {
TMP: '/tmp',
PATH: ''
}
2013-05-31 01:38:44 +00:00
};
});