mirror of
https://github.com/openwrt/luci.git
synced 2026-04-15 19:01:56 +00:00
deploy: 8e3bc67c87
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -19,6 +19,9 @@
|
||||
* @property {number} inode - Inode number
|
||||
* @property {number} uid - Numeric owner id
|
||||
* @property {number} gid - Numeric group id
|
||||
* @property {string} user - User name of owner
|
||||
* @property {string} group - Group name of owner
|
||||
* @property {Object?} target - a dictionary of properties of any symlink target for `list` operation result entries
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -42,6 +45,12 @@ const callFileStat = rpc.declare({
|
||||
params: [ 'path' ]
|
||||
});
|
||||
|
||||
const callFileLStat = rpc.declare({
|
||||
object: 'file',
|
||||
method: 'lstat',
|
||||
params: [ 'path' ]
|
||||
});
|
||||
|
||||
const callFileRead = rpc.declare({
|
||||
object: 'file',
|
||||
method: 'read',
|
||||
@@ -189,6 +198,23 @@ var FileSystem = baseclass.extend(/** @lends LuCI.fs.prototype */ {
|
||||
return callFileStat(path).then(handleRpcReply.bind(this, { '': {} }));
|
||||
},
|
||||
|
||||
/**
|
||||
* Return symlink aware file stat information on the specified path. This
|
||||
* call differs from stat in that it gives information about the symlink
|
||||
* instead of following the symlink, whereby size is the length of the
|
||||
* string of the symlink target path and file name.
|
||||
*
|
||||
* @param {string} path
|
||||
* The filesystem path to lstat.
|
||||
*
|
||||
* @returns {Promise<LuCI.fs.FileStatEntry>}
|
||||
* Returns a promise resolving to a stat detail object or
|
||||
* rejecting with an error stating the failure reason.
|
||||
*/
|
||||
lstat(path) {
|
||||
return callFileLStat(path).then(handleRpcReply.bind(this, { '': {} }));
|
||||
},
|
||||
|
||||
/**
|
||||
* Read the contents of the given file and return them.
|
||||
* Note: this function is unsuitable for obtaining binary data.
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user