示例#1
0
static int cfs_unlink(const char *path)
{
  if (cloudfs_delete_object(path))
  {
    dir_decache(path);
    return 0;
  }
  return -ENOENT;
}
示例#2
0
static int cfs_unlink(const char *path)
{
    int success = cloudfs_delete_object(path);
    if (success == -1)
        return -EACCES;
    if (success)
    {
        dir_decache(path);
        return 0;
    }
    return -ENOENT;
}
示例#3
0
static int cfs_rmdir(const char *path)
{
    int success = cloudfs_delete_object(path);
    if (success == -1)
        return -ENOTEMPTY;
    if (success)
    {
        dir_decache(path);
        return 0;
    }
    return -ENOENT;
}
示例#4
0
static int cfs_unlink(const char* path)
{
  debugf(DBG_LEVEL_NORM, KBLU "cfs_unlink(%s)", path);
  int success = cloudfs_delete_object(path);
  if (success == -1)
  {
    debugf(DBG_LEVEL_NORM, KRED "exit 0: cfs_unlink(%s)", path);
    return -EACCES;
  }
  if (success)
  {
    dir_decache(path);
    debugf(DBG_LEVEL_NORM, KBLU "exit 1: cfs_unlink(%s)", path);
    return 0;
  }
  debugf(DBG_LEVEL_NORM, KRED "exit 2: cfs_unlink(%s)", path);
  return -ENOENT;
}