Open Files 5.3.0
Multi-Platform Event-Driven Application Framework
Open Files Path Handling Facility

The Open Files Path facility provides parsing of local and network paths as well as providing maps of arbitrary paths to a specified destination.

This is a key component of Open Files. The SMB client uses the mapping so that applications don't always have to use either UNC formatted names or SMB URLs. Administrators can map drive letters to particular network paths as is typical in a Win32 environment, or they can map local filesystem paths to a network path as is typpical in a Unix Mount.

Each destination is specified with some target path as well as a file system type. This is used by the redirector to understand the file system handler to use to service a particular file request. This is used by the CIFS server to translate a share path to a particular file system API and target path.

The Open Files Path facility will parse file names in UNC or SMB URL format. The follwing syntax is accepted:

Universal Naming Convention:

\\[username[:password[:domain]]@]server[:port]\share\path\file 

The SMB URL format is:

smb://[username[:password[:domain]]@]/server/share/path/file

The IPC device allows file I/O through the Open Files Pipe file handlers.

IPC:\pipename

The WORKGROUPS device allows browsing of workgroups

WORKGROUPS:[\\lmb]

where lmb is the node name of the local master browser. If not specified Open Files will query for local master browser on each interface.

The SERVERS device allows browsing of servers in a workgroup

SERVERS:[\\lmb]\workgroup

where lmb is as defined for WORKGROUPS and workgroup is the workgroup to browser for servers

The SHARES device allows browsing of shares on a server

SHARES:\\server

where server is the server to browse for shares on.

Typical use cases of the Open Files Stack will not need to manipulate paths. In the event that path manipulation is required, the following APIs are available

Function Decription
ofc_path_init Initialize Path Subsystem
ofc_path_destroy Destroy Path Subsystem
ofc_path_add_mapW Add a Map to the system (wide)
ofc_path_add_map Add a Map to the system (normal)
ofc_path_add_map Add a Map to the system (default)
ofc_path_createW Create a path (wide)
ofc_path_createA Create a path (normal)
ofc_path_create Create a path (default)
ofc_path_init_path Create an empty path
ofc_path_update Map a path through another path
ofc_path_printW convert a path to a string (wide)
ofc_path_printA convert a path to a string (normal)
ofc_path_print convert a path to a string (default)
ofc_path_print_alloc Convert path to wide string and allocate
ofc_path_make_urlW Create a path from components (wide)
ofc_path_make_urlA Create a path from components (normal)
ofc_path_make_url Create a path from components (default)
ofc_path_delete Delete a path
ofc_path_mapW Map a local path to a target path (wide)
ofc_path_mapA Map a local path to a target path (normal)
ofc_path_map Map a local path to a target path (default)
ofc_path_delete_mapW Delete a map (wide)
ofc_path_delete_mapA Delete a map (normal)
ofc_path_delete_map Delete a map (default)
ofc_path_map_deviceW Return Map for a device (wide)
ofc_path_map_deviceA Return Map for a device (normal)
ofc_path_map_device Return Map for a device (default)
ofc_path_is_wild Is the path a wildcard path