1 /*******************************************************************************
2
3 Copyright:
4 Copyright (c) 2005 Kris Bell.
5 Some parts copyright (c) 2009-2016 dunnhumby Germany GmbH.
6 All rights reserved.
7
8 License:
9 Tango Dual License: 3-Clause BSD License / Academic Free License v3.0.
10 See LICENSE_TANGO.txt for details.
11
12 Version: Initial release: March 2005
13
14 Authors: Kris
15
16 *******************************************************************************/
17
18 module ocean.io.model.IFile;
19
20 import ocean.meta.types.Qualifiers;
21
22 /*******************************************************************************
23
24 Generic file-oriented attributes.
25
26 *******************************************************************************/
27
28 public interface FileConst
29 {
30 /***************************************************************************
31
32 A set of file-system specific constants for file and path separators
33 (chars and strings).
34
35 ***************************************************************************/
36
37 enum : char
38 {
39 /// The current directory character.
40 CurrentDirChar = '.',
41
42 /// The file separator character.
43 FileSeparatorChar = '.',
44
45 /// The path separator character.
46 PathSeparatorChar = '/',
47
48 /// The system path character.
49 SystemPathChar = ':',
50 }
51
52 /// The parent directory string.
53 static immutable ParentDirString = "..";
54
55 /// The current directory string.
56 static immutable CurrentDirString = ".";
57
58 /// The file separator string.
59 static immutable FileSeparatorString = ".";
60
61 /// The path separator string.
62 static immutable PathSeparatorString = "/";
63
64 /// The system path string.
65 static immutable SystemPathString = ":";
66
67 /// The newline string.
68 static immutable NewlineString = "\n";
69 }
70
71 /*******************************************************************************
72
73 Passed around during file-scanning.
74
75 *******************************************************************************/
76
77 public struct FileInfo
78 {
79 public istring path;
80 public istring name;
81 public ulong bytes;
82 public bool folder;
83 public bool hidden;
84 public bool system;
85 }