Exemplo n.º 1
0
        //AT 2020.04.23 - file with invalid handle
        internal File(FileSystem fs, TSK_FS_FILE e, Directory parent, string name)
        {
            this._fs           = fs;
            this._handle       = null;
            this._struct       = e;
            this._parentDir    = parent;
            this.InvalidHandle = true;

            if (name == null)
            {
                if (_struct.Name.HasValue)
                {
                    this.Name = _struct.Name.Value.GetName();
                }
            }
            else
            {
                this.Name = name;
            }

            if (_struct.Metadata.HasValue)
            {
                var m = _struct.Metadata.Value;

                this.Address = m.Address;

                this.Type              = m.type;
                this.Size              = m.Size;
                this.CreationTime      = epoch.AddSeconds(m.CRTime);
                this.LastWriteTime     = epoch.AddSeconds(m.MTime);
                this.LastAccessTime    = epoch.AddSeconds(m.ATime);
                this.MetadataWriteTime = epoch.AddSeconds(m.CTime);
            }

            this.FileSystem = this._fs;
        }
Exemplo n.º 2
0
 internal static extern byte tsk_fs_file_walk(FileHandle ptr_fs_file, FileWalkFlag flag, FileContentWalkDelegate file_walk_cb, IntPtr a_ptr);
Exemplo n.º 3
0
 internal static extern int tsk_fs_file_read(FileHandle ptr_fs_file, long offset, byte[] buf, int buf_len, FileReadFlag e);