CreateDirRelative()
Synopsis
BPTR CreateDirRelative(
BPTR lock,
CONST_STRPTR name );
Function
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().
Result
Exclusive lock to the new directory or 0 if it couldn't be
created. IoErr() gives additional information in that case.
Notes
This call is AROS-specific.
DeleteFileRelative()
Synopsis
BOOL DeleteFileRelative(
BPTR lock,
CONST_STRPTR name );
Function
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().
Result
DOSTRUE if the object was deleted, DOSFALSE otherwise.
IoErr() gives additional information in that case.
Notes
This call is AROS-specific.
GetDeviceProcRelative()
Synopsis
struct DevProc * GetDeviceProcRelative(
BPTR lock,
CONST_STRPTR name,
struct DevProc * dp );
Function
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.
Result
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().
Notes
This call is AROS-specific.
IsFileSystemRelative()
Synopsis
BOOL IsFileSystemRelative(
BPTR lock,
CONST_STRPTR name );
Function
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().
Result
TRUE if the handler is a filesystem, FALSE otherwise.
Notes
This call is AROS-specific.
DF0:, HD0:, ... are filesystems. CON:, PIPE:, AUX:, ... are not.
LockRelative()
Synopsis
BPTR LockRelative(
BPTR lock,
CONST_STRPTR name,
LONG accessMode );
Function
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().
Result
Handle to the file or directory or 0 if the object couldn't be
locked. IoErr() gives additional information in that case.
Notes
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.
MakeLinkRelative()
Synopsis
LONG MakeLinkRelative(
BPTR lock,
CONST_STRPTR name,
SIPTR dest,
LONG soft );
Function
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().
Result
boolean - DOSTRUE or DOSFALSE. On error, IoErr() will contain
more information.
Notes
This call is AROS-specific.
OpenRelative()
Synopsis
BPTR OpenRelative(
BPTR lock,
CONST_STRPTR name,
LONG accessMode );
Function
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().
Result
Handle to the file or 0 if the file couldn't be opened.
IoErr() gives additional information in that case.
Notes
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.
RenameRelative()
Synopsis
LONG RenameRelative(
BPTR oldLock,
CONST_STRPTR oldName,
BPTR newLock,
CONST_STRPTR newName );
Function
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().
Result
boolean - DOSTRUE or DOSFALSE. IoErr() provides additional
information on DOSFALSE.
Notes
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.
SetFileDateRelative()
Synopsis
BOOL SetFileDateRelative(
BPTR lock,
CONST_STRPTR name,
const struct DateStamp * date );
Function
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().
Result
Boolean success indicator. IoErr() gives additional information
upon failure.
Notes
This call is AROS-specific.
SetOwnerRelative()
Synopsis
BOOL SetOwnerRelative(
BPTR lock,
CONST_STRPTR name,
ULONG owner_info );
Function
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().
Result
Boolean success indicator. IoErr() gives additional information
upon failure.
Notes
This call is AROS-specific.
SetProtectionRelative()
Synopsis
LONG SetProtectionRelative(
BPTR lock,
CONST_STRPTR name,
ULONG protect );
Function
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().
Result
Boolean success indicator. IoErr() gives additional information
upon failure.
Notes
This call is AROS-specific.