Example #1
0
        public bool Delete()
        {
            string e; Trace_i($"Deleting {Name}...");

            if (!_Found)
            {
                return
                    (Debug_o("No need to delete non-existent file."));
            }

            if (!_fs.TryDeleteFile(Path, out e))
            {
                return(Error_o("Failed to delete file." + L.F + e));
            }

            if (_Found)
            {
                return(Error_o("_fs.TryDeleteFile() returned success but file is still there."));
            }

            return(Trace_o("Successfully deleted file."));
        }