CBFS Storage 2020 Python Edition

Questions / Feedback?

delete_file Method

Deletes a vault item.

Syntax

def delete_file(file_name: str) -> None: ...

Remarks

This method deletes the vault item (file, directory, symbolic link, or alternate stream) specified by FileName from the vault.

The value passed for FileName must be a vault-local absolute path.

Please note that:

  • When a file is deleted, any alternate streams it contains are deleted as well.
  • Directories must be empty to be deleted, otherwise this method raises an exception. Use the is_directory_empty method to check whether a directory is empty.
  • Deleting a symbolic link only deletes the link itself, not the file it points to.

Note: This method can only be called when active is True, and cannot be called within events.

Copyright (c) 2021 Callback Technologies, Inc. - All rights reserved.
CBFS Storage 2020 Python Edition - Version 20.0 [Build 8031]