|
APIs in Category: file |
API version 1.4 |
file-create-symlink |
The path and filename values used in these APIs are "NFS" filenames by default. If a file is created with a name that is illegal in CIFS, CIFS access to the file will need to use the file's 8.3 name. Similarly, if two filenames created by these APIs differ only by case (e.g. "a" and "A"), CIFS access will see the 8.3 name for the second one created. |
| file-create-symlink | [top] |
Create a symlink.
Input Name Range Type Description path string
Path of the symlink file to create. The value is expected to begin with /vol/ . symlink string
Value of the symlink.
| file-delete-directory | [top] |
Delete a directory.
Input Name Range Type Description path string
Path of the directory to delete. The value is expected to begin with /vol/ . The directory must be empty in order for this API to succeed.
| file-delete-file | [top] |
Delete a file.
Input Name Range Type Description path string
Path of the file or symlink to delete. The value is expected to begin with /vol/ .
| file-list-directory-iter-end | [top] |
Terminate a directory iteration.
Input Name Range Type Description tag string
Tag from a previous file-list-directory-iter-start.
Errno Description ENOENT
| file-list-directory-iter-next | [top] |
Obtain a list of files in a given directory.
Input Name Range Type Description maximum integer
Maximum number of directory entries to retrieve. tag string
Tag from a previous file-list-directory-iter-start. Output Name Range Type Description files file-info[]
Array with information for each file in the named directory. records integer
This tells you how many records are being returned from this particular call to file-list-directory-iter-next. When this value is 0, you have retrieved everything.
Errno Description ENOENT
| file-list-directory-iter-start | [top] |
Start in iteration through the list of files in a given directory.
Input Name Range Type Description path string
Pathname of the directory to list. The value is expected to begin with /vol/ . Output Name Range Type Description records integer
Number of items that have been saved for future retrieval with file-list-directory-iter-next. tag string
Tag to be used in subsequent iterations.
Errno Description ENOENT
| file-read-file | [top] |
Read data from a named file.
Input Name Range Type Description length integer
Number of bytes to read from the file. offset integer
Offset into file to start reading from. path string
Name of the file to read, in the form "/vol/ / ". Output Name Range Type Description data string
Data read from the file. The format of the data is ASCII hex characters, two characters representing one byte from the file. (This format allows the representation of 0-valued bytes.) length integer
Number of bytes actually read from the file. If this value is 0, then you have attempted to read at or past the end of the file.
Errno Description ENOENT
| file-read-symlink | [top] |
Read the contents of a symlink.
Input Name Range Type Description path string
Path of the symlink file to read. The value is expected to begin with /vol/ . Output Name Range Type Description symlink string
Value of the symlink. In other words, this is the destination path contained in the symlink.
| file-truncate-file | [top] |
Truncate a file. Any data past the truncation point will be lost, of course.
Input Name Range Type Description path string
Path of the file to truncate. The value is expected to begin with /vol/ . size string
optional
If provided, the file size is set to this value. The default value is 0.
Errno Description ENOENT
| file-write-file | [top] |
Write data into a named file. If the file does not previously exist, it will be created - the owner of the file will be root and it will not be readable or writable by non-root users.
Input Name Range Type Description data string
Data to be written. The format of the data is ASCII hex characters, two characters representing one byte. Whitespace characters, for convenience in formatting, can be present in the value and are ignored. offset integer
Offset into file at which to start writing. If the offset is -1, the data is appended to the file. overwrite boolean
optional
If false, and the file already exists, then the API will fail, with an errno of EEXIST. This allows the client to ensure that it was the exclusive creator of the file. The default value is true. path string
Pathname of the file to write. The value is expected to begin with /vol/ . Output Name Range Type Description length integer
Number of bytes actually written.
Errno Description ENOENT
| Element definition: file-info | [top] |
Name Range Type Description file-type string
Type of the file. Possible values: file, directory, blockdev, chardev, symlink, socket, fifo, stream, lun. name string
Name of the file.