ROX-CLib: rox_path.c File Reference

- Main Page
- Data Structures
- Files
- Related Pages

- File List
- Globals

# rox_path.c File Reference

Utilities for path handling, including support for drag & drop. More...

`#include "rox-clib.h"`
`#include <stdlib.h>`
`#include <string.h>`
`#include <glib.h>`
`#include "rox_path.h"`
`#include "rox_debug.h"`

## Functions
char * | rox_path_get_local (const char *uri)
int | rox_hostname_is_local (const char *hname)
char * | rox_path_get_server (const char *uri)
char * | rox_path_get_path (const char *uri)

## Detailed Description

Utilities for path handling, including support for drag & drop.

Author:
  Stephen Watson

Version:
  Id
    rox_path.c,v 1.10 2005/09/10 16:16:30 stephen Exp

## Function Documentation

int rox_hostname_is_local | ( | const char * | hname | ) |

Determine whether or not a host name identifies the local machine.

Parameters:

  `[in]` | hname | host name to check.

Returns:
  non-zero if the host name belongs to the local machine

char* rox_path_get_local | ( | const char * | uri | ) |

Given a URI return a local path using rox_unescape_uri() to convert the path. file://thishost/path -> /path

Parameters:

  `[in]` | uri | uri to process

Returns:
  local path (pass to g_free() when done) or `NULL` if it is not a local file path.

char* rox_path_get_path | ( | const char * | uri | ) |

Given a file: URI, return the path part of the URI using rox_unescape_uri() to convert the path. file://host/path -> /path

Parameters:

  `[in]` | uri | uri to process

Returns:
  server name (pass to g_free() when done), or `NULL` if not a valid file: URI.

char* rox_path_get_server | ( | const char * | uri | ) |

Given a file: URI, return the host part of the URI. file://host/path -> host

Parameters:

  `[in]` | uri | uri to process

Returns:
  server name (pass to g_free() when done).