Skip to content

Commit 22ca15c

Browse files
committed
Merge branch 'master' into develop
2 parents c033985 + d30f080 commit 22ca15c

19 files changed

Lines changed: 391 additions & 50 deletions

File tree

ESFileManager.xcodeproj/project.pbxproj

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
/* Begin PBXBuildFile section */
1010
D42DBBD5246E9FC70065641B /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = D42DBBD4246E9FC70065641B /* README.md */; };
11+
D4B11B212472F61B001647DA /* ESPFileManager.podspec in Resources */ = {isa = PBXBuildFile; fileRef = D4B11B202472F61B001647DA /* ESPFileManager.podspec */; };
1112
D4BDE4D5246C4EC800E745E1 /* ESFileNameModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4BDE4D4246C4EC800E745E1 /* ESFileNameModel.swift */; };
1213
D4EA4622246C0683003C40D6 /* ESFileManager.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D4EA4618246C0682003C40D6 /* ESFileManager.framework */; };
1314
D4EA4627246C0683003C40D6 /* ESFileManagerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4EA4626246C0683003C40D6 /* ESFileManagerTests.swift */; };
@@ -58,6 +59,7 @@
5859

5960
/* Begin PBXFileReference section */
6061
D42DBBD4246E9FC70065641B /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
62+
D4B11B202472F61B001647DA /* ESPFileManager.podspec */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ESPFileManager.podspec; sourceTree = "<group>"; };
6163
D4BDE4D4246C4EC800E745E1 /* ESFileNameModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ESFileNameModel.swift; sourceTree = "<group>"; };
6264
D4EA4618246C0682003C40D6 /* ESFileManager.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ESFileManager.framework; sourceTree = BUILT_PRODUCTS_DIR; };
6365
D4EA461B246C0683003C40D6 /* ESFileManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ESFileManager.h; sourceTree = "<group>"; };
@@ -118,6 +120,7 @@
118120
isa = PBXGroup;
119121
children = (
120122
D42DBBD4246E9FC70065641B /* README.md */,
123+
D4B11B202472F61B001647DA /* ESPFileManager.podspec */,
121124
D4EA461A246C0683003C40D6 /* ESFileManager */,
122125
D4EA4625246C0683003C40D6 /* ESFileManagerTests */,
123126
D4FCD006246EB88800B85CA6 /* ESFileManagerExample_iOS */,
@@ -326,6 +329,7 @@
326329
buildActionMask = 2147483647;
327330
files = (
328331
D42DBBD5246E9FC70065641B /* README.md in Resources */,
332+
D4B11B212472F61B001647DA /* ESPFileManager.podspec in Resources */,
329333
);
330334
runOnlyForDeploymentPostprocessing = 0;
331335
};
@@ -538,7 +542,7 @@
538542
buildSettings = {
539543
CODE_SIGN_STYLE = Automatic;
540544
DEFINES_MODULE = YES;
541-
DEVELOPMENT_TEAM = 2W82R63KFN;
545+
DEVELOPMENT_TEAM = "";
542546
DYLIB_COMPATIBILITY_VERSION = 1;
543547
DYLIB_CURRENT_VERSION = 1;
544548
DYLIB_INSTALL_NAME_BASE = "@rpath";
@@ -563,7 +567,7 @@
563567
buildSettings = {
564568
CODE_SIGN_STYLE = Automatic;
565569
DEFINES_MODULE = YES;
566-
DEVELOPMENT_TEAM = 2W82R63KFN;
570+
DEVELOPMENT_TEAM = "";
567571
DYLIB_COMPATIBILITY_VERSION = 1;
568572
DYLIB_CURRENT_VERSION = 1;
569573
DYLIB_INSTALL_NAME_BASE = "@rpath";
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Pod::Spec.new do |s|
2+
3+
# 1
4+
s.platforms = { :ios => "11.0", :osx => "10.14", :watchos => "5.0", :tvos => "10.0" }
5+
s.name = "ESFileManager"
6+
s.summary = "ESFileManager swift 5.1 framework for advanced write and read file from your local iOS storage."
7+
s.requires_arc = true
8+
9+
# 2
10+
s.version = "0.0.3"
11+
12+
# 3
13+
s.license = { :type => "MIT", :file => "LICENSE" }
14+
15+
# 4 - Replace with your name and e-mail address
16+
s.author = { "Dmitriy Toropkin" => "toropkind@gmail.com" }
17+
18+
# 5 - Replace this URL with your own Github page's URL (from the address bar)
19+
s.homepage = "https://github.com/ESKARIA/ESFileManager.git"
20+
21+
# 6 - Replace this URL with your own Git URL from "Quick Setup"
22+
s.source = { :git => "https://github.com/ESKARIA/ESFileManager.git", :tag => "#{s.version}"}
23+
24+
# 7
25+
s.framework = "Foundation"
26+
27+
# 8
28+
s.source_files = "ESFileManager/**/*.{swift}"
29+
s.exclude_files = 'ESFileManager/ESFileManagerExample_iOS/', 'ESFileManagerExample_iOS/', 'ESFileManager/ESFileManagerTests', 'ESFileManagerTests'
30+
31+
end

ESFileManager/FileManager/Data Layer/Manager/ESFileManager.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -173,33 +173,33 @@ public struct ESFileManager {
173173

174174
extension ESFileManager: ESFileManagerProtocol {
175175

176-
/// write data file to disk at custom directory
176+
/// write data file to disk at directory. For default directory from init set at: nil
177177
/// - Parameters:
178178
/// - completion: completion block with optional Error
179179
/// - file: file to write
180-
/// - directory: directory to write
180+
/// - directory: directory to write. Set nil for directory from init
181181
public func write(file: ESFileModel, at directory: ESFileManagerDirectory?, completion: ((Error?) -> Void)?) {
182182
self._write(file: file, at: directory, completion: completion)
183183
}
184184

185-
/// Read data file from disk at custom directory
185+
/// Read data file from disk at directory. For default directory from init set at: nil
186186
/// - Parameter completion: completion block with optional data from storage
187187
/// - Parameter fileStorage: file name and extension
188-
/// - Parameter directory: directory to write
188+
/// - Parameter directory: directory to write. Set nil for directory from init
189189
public func read(fileStorage: ESFileNameModel, at directory: ESFileManagerDirectory?, completion: ((ESFileModel?, Error?) -> Void)?) {
190190
self._read(fileStorage: fileStorage, at: directory, completion: completion)
191191
}
192192

193-
/// Remove file from disk at custom directory
193+
/// Remove file from disk at directory. For default directory from init set at: nil
194194
/// - Parameter completion: completion block with optional Error
195195
/// - Parameter file: file to remove
196196
public func remove(file: ESFileNameModel, at directory: ESFileManagerDirectory?, completion: ((Error?) -> Void)?) {
197197
self._remove(file: file, at: directory, completion: completion)
198198
}
199199

200-
/// Get list files in storage at custom directory
200+
/// Get list files in storage at directory. For default directory from init set at: nil
201201
/// - Parameter completion: callback block with array of files.
202-
/// - Parameter directory: custom directory
202+
/// - Parameter directory: directory. Set nil for directory from init
203203
public func listFiles(at directory: ESFileManagerDirectory?, completion: (([ESFileNameModel]?, Error?) -> Void)?) {
204204
self._listFiles(at: directory, completion: completion)
205205
}

ESFileManager/FileManager/Data Layer/Manager/ESFileManagerProtocol.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,26 @@ import Foundation
1313
/// Protocol for Manager for write and read file from bundle
1414
public protocol ESFileManagerProtocol {
1515

16-
/// write data file to disk at custom directory
16+
/// write data file to disk at directory. For default directory from init set at: nil
1717
/// - Parameters:
1818
/// - completion: completion block with optional Error
1919
/// - file: file to write
20-
/// - directory: directory to write
20+
/// - directory: directory to write. Set nil for directory from init
2121
func write(file: ESFileModel, at directory: ESFileManagerDirectory?, completion: ((Error?) -> Void)?)
2222

23-
/// Read data file from disk at custom directory
23+
/// Read data file from disk at directory. For default directory from init set at: nil
2424
/// - Parameter completion: completion block with optional data from storage
2525
/// - Parameter fileStorage: file name and extension
26-
/// - Parameter directory: directory to write
26+
/// - Parameter directory: directory to write. Set nil for directory from init
2727
func read(fileStorage: ESFileNameModel, at directory: ESFileManagerDirectory?, completion: ((ESFileModel?, Error?) -> Void)?)
2828

29-
/// Remove file from disk at custom directory
29+
/// Remove file from disk at directory. For default directory from init set at: nil
3030
/// - Parameter completion: completion block with optional Error
3131
/// - Parameter file: file to remove
3232
func remove(file: ESFileNameModel, at directory: ESFileManagerDirectory?, completion: ((Error?) -> Void)?)
3333

34-
/// Get list files in storage at custom directory
34+
/// Get list files in storage at directory. For default directory from init set at: nil
3535
/// - Parameter completion: callback block with array of files.
36-
/// - Parameter directory: custom directory
36+
/// - Parameter directory: directory. Set nil for directory from init
3737
func listFiles(at directory: ESFileManagerDirectory?, completion: (([ESFileNameModel]?, Error?) -> Void)?)
3838
}

ESPFileManager.podspec

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Pod::Spec.new do |s|
2+
3+
# 1
4+
s.platforms = { :ios => "11.0", :osx => "10.14", :watchos => "5.0", :tvos => "10.0" }
5+
s.name = "ESPFileManager"
6+
s.summary = "ESFileManager swift 5.1 framework for advanced write and read file from your local iOS storage."
7+
s.requires_arc = true
8+
9+
# 2
10+
s.version = "0.0.5"
11+
12+
# 3
13+
s.license = { :type => "MIT", :file => "LICENSE" }
14+
15+
# 4 - Replace with your name and e-mail address
16+
s.author = { "Dmitriy Toropkin" => "toropkind@gmail.com" }
17+
18+
# 5 - Replace this URL with your own Github page's URL (from the address bar)
19+
s.homepage = "https://github.com/ESKARIA/ESFileManager.git"
20+
21+
# 6 - Replace this URL with your own Git URL from "Quick Setup"
22+
s.source = { :git => "https://github.com/ESKARIA/ESFileManager.git", :tag => "#{s.version}"}
23+
24+
# 7
25+
s.framework = "Foundation"
26+
27+
# 8
28+
s.source_files = "ESFileManager/**/*.{swift}"
29+
s.exclude_files = 'ESFileManager/ESFileManagerExample_iOS/', 'ESFileManagerExample_iOS/', 'ESFileManager/ESFileManagerTests', 'ESFileManagerTests'
30+
31+
end
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Pod::Spec.new do |s|
2+
3+
# 1
4+
s.platforms = { :ios => "11.0", :osx => "10.14", :watchos => "5.0", :tvos => "10.0" }
5+
s.name = "ESPFileManager"
6+
s.summary = "ESFileManager swift 5.1 framework for advanced write and read file from your local iOS storage."
7+
s.requires_arc = true
8+
9+
# 2
10+
s.version = "0.0.4"
11+
12+
# 3
13+
s.license = { :type => "MIT", :file => "LICENSE" }
14+
15+
# 4 - Replace with your name and e-mail address
16+
s.author = { "Dmitriy Toropkin" => "toropkind@gmail.com" }
17+
18+
# 5 - Replace this URL with your own Github page's URL (from the address bar)
19+
s.homepage = "https://github.com/ESKARIA/ESFileManager.git"
20+
21+
# 6 - Replace this URL with your own Git URL from "Quick Setup"
22+
s.source = { :git => "https://github.com/ESKARIA/ESFileManager.git", :tag => "#{s.version}"}
23+
24+
# 7
25+
s.framework = "Foundation"
26+
27+
# 8
28+
s.source_files = "ESFileManager/**/*.{swift}"
29+
s.exclude_files = 'ESFileManager/ESFileManagerExample_iOS/', 'ESFileManagerExample_iOS/', 'ESFileManager/ESFileManagerTests', 'ESFileManagerTests'
30+
31+
end
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Pod::Spec.new do |s|
2+
3+
# 1
4+
s.platforms = { :ios => "11.0", :osx => "10.14", :watchos => "5.0", :tvos => "10.0" }
5+
s.name = "ESPFileManager"
6+
s.summary = "ESFileManager swift 5.1 framework for advanced write and read file from your local iOS storage."
7+
s.requires_arc = true
8+
9+
# 2
10+
s.version = "0.0.5"
11+
12+
# 3
13+
s.license = { :type => "MIT", :file => "LICENSE" }
14+
15+
# 4 - Replace with your name and e-mail address
16+
s.author = { "Dmitriy Toropkin" => "toropkind@gmail.com" }
17+
18+
# 5 - Replace this URL with your own Github page's URL (from the address bar)
19+
s.homepage = "https://github.com/ESKARIA/ESFileManager.git"
20+
21+
# 6 - Replace this URL with your own Git URL from "Quick Setup"
22+
s.source = { :git => "https://github.com/ESKARIA/ESFileManager.git", :tag => "#{s.version}"}
23+
24+
# 7
25+
s.framework = "Foundation"
26+
27+
# 8
28+
s.source_files = "ESFileManager/**/*.{swift}"
29+
s.exclude_files = 'ESFileManager/ESFileManagerExample_iOS/', 'ESFileManagerExample_iOS/', 'ESFileManager/ESFileManagerTests', 'ESFileManagerTests'
30+
31+
end

README.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,23 @@
22

33
A simple library for use iOS File manager
44

5+
# Install
6+
7+
## Swift Package Manager
8+
9+
Add ESFileManager git url to you project and it install automatically
10+
11+
## Cocoapods
12+
13+
Just add ESFileManager to your podfile like this
14+
15+
```swift
16+
pod 'ESPFileManager'
17+
```
18+
19+
Why it called esPfilemanager? Cause one guy create lib with name ESFIleManager before i do
20+
21+
522
# Usage
623

724
## Standart use
@@ -12,8 +29,6 @@ A simple library for use iOS File manager
1229
import ESFileManager
1330
```
1431

15-
[model of log](https://eskaria.github.io/AdvancedLogger/Structs.html#/s:14AdvancedLogger0aB5ModelV)
16-
1732
2) Create property of ESFileManager. In argument used default way for write/read data, but you can use init with default value "Document folder without iCloud sync". You can read about [this folders and when use kind of this](https://eskaria.github.io/ESFileManager/Enums/ESFileExtensionType.html)
1833

1934
```swift

docs/Protocols/ESFileManagerProtocol.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ <h1>ESFileManagerProtocol</h1>
9191
<section class="section">
9292
<div class="pointer"></div>
9393
<div class="abstract">
94-
<p>write data file to disk at custom directory</p>
94+
<p>write data file to disk at directory. For default directory from init set at: nil</p>
9595

9696
</div>
9797
<div class="declaration">
@@ -138,7 +138,7 @@ <h4>Parameters</h4>
138138
</td>
139139
<td>
140140
<div>
141-
<p>directory to write</p>
141+
<p>directory to write. Set nil for directory from init</p>
142142
</div>
143143
</td>
144144
</tr>
@@ -161,7 +161,7 @@ <h4>Parameters</h4>
161161
<section class="section">
162162
<div class="pointer"></div>
163163
<div class="abstract">
164-
<p>Read data file from disk at custom directory</p>
164+
<p>Read data file from disk at directory. For default directory from init set at: nil</p>
165165

166166
</div>
167167
<div class="declaration">
@@ -208,7 +208,7 @@ <h4>Parameters</h4>
208208
</td>
209209
<td>
210210
<div>
211-
<p>directory to write</p>
211+
<p>directory to write. Set nil for directory from init</p>
212212
</div>
213213
</td>
214214
</tr>
@@ -231,7 +231,7 @@ <h4>Parameters</h4>
231231
<section class="section">
232232
<div class="pointer"></div>
233233
<div class="abstract">
234-
<p>Remove file from disk at custom directory</p>
234+
<p>Remove file from disk at directory. For default directory from init set at: nil</p>
235235

236236
</div>
237237
<div class="declaration">
@@ -289,7 +289,7 @@ <h4>Parameters</h4>
289289
<section class="section">
290290
<div class="pointer"></div>
291291
<div class="abstract">
292-
<p>Get list files in storage at custom directory</p>
292+
<p>Get list files in storage at directory. For default directory from init set at: nil</p>
293293

294294
</div>
295295
<div class="declaration">
@@ -324,7 +324,7 @@ <h4>Parameters</h4>
324324
</td>
325325
<td>
326326
<div>
327-
<p>custom directory</p>
327+
<p>directory. Set nil for directory from init</p>
328328
</div>
329329
</td>
330330
</tr>

0 commit comments

Comments
 (0)