--- Cannot embed stylesheet: [Errno 2] No such file or directory: '../../../aros.css' --->
BPTR CreateDirRelative(
BPTR lock,
CONST_STRPTR name );
Creates a new directory under the given name, resolving a relative name against the given directory lock instead of the current directory of the calling process. If all went well, an exclusive lock on the new directory is returned. If name is absolute (names a volume, device or assign, or begins with ':'), lock is ignored. If lock is NULL, the name is resolved against the current directory. In both cases the call behaves exactly like dos.library/CreateDir().
lock - directory lock to resolve a relative name against,
or NULL for the current directory
name - NUL terminated name.
Exclusive lock to the new directory or 0 if it couldn't be created. IoErr() gives additional information in that case.
This call is AROS-specific.
BOOL DeleteFileRelative(
BPTR lock,
CONST_STRPTR name );
Tries to delete a file or directory, resolving a relative name against the given directory lock instead of the current directory of the calling process. May fail if the file is in use or protected from deletion. If name is absolute (names a volume, device or assign, or begins with ':'), lock is ignored. If lock is NULL, the name is resolved against the current directory. In both cases the call behaves exactly like dos.library/DeleteFile().
lock - directory lock to resolve a relative name against,
or NULL for the current directory
name - NUL terminated name of the file or directory.
DOSTRUE if the object was deleted, DOSFALSE otherwise. IoErr() gives additional information in that case.
This call is AROS-specific.
struct DevProc * GetDeviceProcRelative(
BPTR lock,
CONST_STRPTR name,
struct DevProc * dp );
GetDeviceProcRelative() will find the filesystem handler which you should send a command to for a specific path, and the lock the path is relative to. For a relative name the result refers to the handler owning the given lock, with the lock itself as dvp_Lock; a packet built from it names the object exactly as LockRelative() would. If name is absolute (names a volume, device or assign, or begins with ':'), lock is ignored. If lock is NULL, the name is resolved against the current directory. In both cases the call behaves exactly like dos.library/GetDeviceProc(), including the iteration over the targets of a multi-directory assign. The first call should have the |dp| parameter as NULL. Passing a previous result continues an iteration; a result obtained for a name relative to a lock has no further entries.
lock - directory lock to resolve a relative name against,
or NULL for the current directory
name - Name of the object to find.
dp - Previous result of GetDeviceProcRelative() or NULL.
A pointer to a DevProc structure containing the information required to send a command to a filesystem, or NULL with IoErr() set. Release it with dos.library/FreeDeviceProc().
This call is AROS-specific.
BOOL IsFileSystemRelative(
BPTR lock,
CONST_STRPTR name );
Query whether the handler that would service a path is a filesystem. For a name relative to lock that is the handler owning the lock. If name is absolute (names a volume, device or assign, or begins with ':'), or is the console alias "*", lock is ignored. If lock is NULL, the name is resolved against the current directory. In both cases the call behaves exactly like dos.library/IsFileSystem().
lock - directory lock to resolve a relative name against,
or NULL for the current directory
name - Name of the object or device to query.
TRUE if the handler is a filesystem, FALSE otherwise.
This call is AROS-specific. DF0:, HD0:, ... are filesystems. CON:, PIPE:, AUX:, ... are not.
BPTR LockRelative(
BPTR lock,
CONST_STRPTR name,
LONG accessMode );
Gets a lock on a file or directory, resolving a relative name against the given directory lock instead of the current directory of the calling process. The name is handed to the filesystem together with the lock, so the object is located in a single filesystem operation: no path string is assembled, and a link in the path cannot be retargeted by another process between the lookup and the lock. If name is absolute (names a volume, device or assign, or begins with ':'), lock is ignored. If lock is NULL, the name is resolved against the current directory. In both cases the call behaves exactly like dos.library/Lock().
lock - directory lock to resolve a relative name against,
or NULL for the current directory
name - NUL terminated name of the file or directory.
accessMode - One of SHARED_LOCK
EXCLUSIVE_LOCK
Handle to the file or directory or 0 if the object couldn't be locked. IoErr() gives additional information in that case.
This call is AROS-specific. It is the equivalent of the POSIX *at() family's directory-relative name resolution. Soft links are followed as by Lock(), up to the same nesting limit; a link target without a volume specifier is itself resolved relative to lock.
LONG MakeLinkRelative(
BPTR lock,
CONST_STRPTR name,
SIPTR dest,
LONG soft );
MakeLinkRelative() will create a link between two files or directories, resolving a relative link name against the given directory lock instead of the current directory of the calling process. A link is a filesystem object that refers to another file. A soft link refers to another file or directory by name, and is resolved by the filesystem and the caller. Soft links are not restricted to the same volume and the target does not have to exist. The target name is stored as given; a relative target is later resolved against the directory holding the link. A hard link refers to another file by the location on a disk, and is resolved by the filesystem. Hard links are restricted to files or directories on the same volume. If name is absolute (names a volume, device or assign, or begins with ':'), lock is ignored. If lock is NULL, the name is resolved against the current directory. In both cases the call behaves exactly like dos.library/MakeLink().
lock - directory lock to resolve a relative link name against,
or NULL for the current directory
name - The name of the link to create
dest - If 'soft' is TRUE this must be a filename; if it is FALSE
a lock pointing to the file to be hard-linked must be
provided
soft - TRUE, if a soft link is to be created, FALSE for a hard
link
boolean - DOSTRUE or DOSFALSE. On error, IoErr() will contain more information.
This call is AROS-specific.
BPTR OpenRelative(
BPTR lock,
CONST_STRPTR name,
LONG accessMode );
Opens a file for read and/or write depending on the accessmode
given, resolving a relative name against the given directory
lock instead of the current directory of the calling process.
The name is handed to the filesystem together with the lock, so
the file is located and opened in a single filesystem operation.
If name is absolute (names a volume, device or assign, or begins
with ':'), or is one of the console aliases ("*", "CONSOLE:"),
lock is ignored. If lock is NULL, the name is resolved against
the current directory. In both cases the call behaves exactly
like dos.library/Open().
lock - directory lock to resolve a relative name against,
or NULL for the current directory
name - NUL terminated name of the file.
accessMode - One of MODE_OLDFILE - open existing file
MODE_NEWFILE - delete old, create new file
exclusive lock
MODE_READWRITE - open new one if it doesn't exist
Handle to the file or 0 if the file couldn't be opened. IoErr() gives additional information in that case.
This call is AROS-specific. Soft links are followed as by Open(), up to the same nesting limit; a link target without a volume specifier is itself resolved relative to lock.
LONG RenameRelative(
BPTR oldLock,
CONST_STRPTR oldName,
BPTR newLock,
CONST_STRPTR newName );
Renames a given file, resolving each relative name against its own directory lock instead of the current directory of the calling process. The old name and the new name must point to the same volume. Both names, with their locks, are handed to the filesystem in a single rename operation; no path string is assembled for either side. A name that is absolute (names a volume, device or assign, or begins with ':') ignores its lock. A name whose lock is NULL is resolved against the current directory. When this applies to both names the call behaves exactly like dos.library/Rename().
oldLock - directory lock to resolve a relative oldName against,
or NULL for the current directory
oldName - Name of the file to rename
newLock - directory lock to resolve a relative newName against,
or NULL for the current directory
newName - New name of the file to rename
boolean - DOSTRUE or DOSFALSE. IoErr() provides additional information on DOSFALSE.
This call is AROS-specific. Relative names are passed to the filesystem as written; unlike dos.library/Rename(), no canonical path is built for a name holding a parent reference (a/b//c). The filesystem resolves such a reference against the lock it is given.
LONG SetCommentRelative(
BPTR lock,
CONST_STRPTR name,
CONST_STRPTR comment );
Change the comment on a file or directory, resolving a relative name against the given directory lock instead of the current directory of the calling process. The comment may be any NUL-terminated string. The supported size varies from filesystem to filesystem. In order to clear an existing comment, an empty string should be specified. If name is absolute (names a volume, device or assign, or begins with ':'), lock is ignored. If lock is NULL, the name is resolved against the current directory. In both cases the call behaves exactly like dos.library/SetComment().
lock - directory lock to resolve a relative name against,
or NULL for the current directory
name - name of the file
comment - new comment for the file.
Boolean success indicator. IoErr() gives additional information upon failure.
This call is AROS-specific.
BOOL SetFileDateRelative(
BPTR lock,
CONST_STRPTR name,
const struct DateStamp * date );
Set the modification date of a file or directory, resolving a relative name against the given directory lock instead of the current directory of the calling process. If name is absolute (names a volume, device or assign, or begins with ':'), lock is ignored. If lock is NULL, the name is resolved against the current directory. In both cases the call behaves exactly like dos.library/SetFileDate().
lock - directory lock to resolve a relative name against,
or NULL for the current directory
name - name of the file
date - new modification date.
Boolean success indicator. IoErr() gives additional information upon failure.
This call is AROS-specific.
BOOL SetOwnerRelative(
BPTR lock,
CONST_STRPTR name,
ULONG owner_info );
Set the owner of a file or directory, resolving a relative name against the given directory lock instead of the current directory of the calling process. If name is absolute (names a volume, device or assign, or begins with ':'), lock is ignored. If lock is NULL, the name is resolved against the current directory. In both cases the call behaves exactly like dos.library/SetOwner().
lock - directory lock to resolve a relative name against,
or NULL for the current directory
name - name of the file
owner_info - the user id in the upper 16 bits and the group id
in the lower 16 bits.
Boolean success indicator. IoErr() gives additional information upon failure.
This call is AROS-specific.
LONG SetProtectionRelative(
BPTR lock,
CONST_STRPTR name,
ULONG protect );
Set the protection bits of a file or directory, resolving a relative name against the given directory lock instead of the current directory of the calling process. If name is absolute (names a volume, device or assign, or begins with ':'), lock is ignored. If lock is NULL, the name is resolved against the current directory. In both cases the call behaves exactly like dos.library/SetProtection().
lock - directory lock to resolve a relative name against,
or NULL for the current directory
name - name of the file
protect - new protection bits (FIBF_*).
Boolean success indicator. IoErr() gives additional information upon failure.
This call is AROS-specific.